-
Notifications
You must be signed in to change notification settings - Fork 74
* Revisit #648 #2489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
* Revisit #648 #2489
Conversation
Will be testing during this week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A strange thing is that the InternalPanel is selectable. if you click that area. When the title-bar is clicked the KForm is selected. The latter should be the case when any part of the form is clicked, the form is selected in the properties window.
I cant see any improvement in this branch atm.
Also controls cannot be added, as was the case before.
devenv_hAwOMPRKTp.mp4
Please have this corrected before requesting a review.
Thanks.
I don't know why, but it seems to work correctly in some instances but not others... |
Why does the menu interfere with the controls area / internalPanel... |
That, I don't understand, as it never touches it? |
Yesssssssssssssss......... fixed it!!!!!!!!!!! |
I'd like to take this a bit further.
|
And controls cant be added normally nor can they be moved across the form. |
This is pretty much of a hit and miss... Screen.Recording.2025-09-17.084932.mp4 |
So disabling worked at designtime, nice. There have been quite a few edits to try to get this fixed. Which most of those are likely unnecessary. So best is to clean all this out and get it nice and tidy. When going over the code I think there are also some stale code blocks. After that I'd like to go over the code and have a look at the need for nullability on vars/instances to reduce null checks. # EDIT:Or maybe better take a new branch from Alpha to lose all the changes. And:Since this all happens in the form instance the /// <summary>
/// Robust design mode detection that works both at design time and runtime.
/// </summary>
private bool IsInDesignMode()
{
// Multiple checks for robust designer mode detection
return LicenseManager.UsageMode == LicenseUsageMode.Designtime ||
Site?.DesignMode == true ||
(Site?.Container?.Components?.OfType<Control>().Any(c => c.Site?.DesignMode == true) == true);
}``` |
Not necessary, as systemmenu is now disabled at design time. That's what the code block is for. |
Testing... ShowOnAltSpace set to false still shows the themed menu. |
|
Please retry |
Getting close... System menu opens on the wrong location using ALT+SPACE TestForm_G8wLek6eq6.mp4
devenv_8vnWDfnM55.mp4 |
OK in this state it won't pose a problem to the user and you have time to get it sorted. |
Just taken out the references, so it should now build |
/// | ||
/// The definitions in this file provide the foundational types and contracts that enable | ||
/// the flexible theming, styling, and behavior customization capabilities of the Krypton Toolkit. | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PWagner1
cc.: @tobitege, @Smurf-IV, @KamaniAR & @lesandrog
Suppressing the warning here is imo not a good way to go about this.
The XML Doc tags have none for namespaces. Maybe this works now but could create a problem in the future.
Also the text is not about the namespace but about the content of the file.
My Suggestion is to go for the standard block comment to tell something about the file contents.
Like:
/*
* Core definitions file for the Krypton Toolkit containing interfaces, enums, and type definitions
* used throughout the Krypton UI component library.
*
* This file contains:
* - Core interfaces for content values, button specifications, and context menu providers
* - Enumerations for UI states, orientations, styles, and behaviors
* - Type definitions for palette states, button styles, and layout specifications
* - Constants and enumerations for message boxes, icons, and theme types
*
* The definitions in this file provide the foundational types and contracts that enable
* the flexible theming, styling, and behavior customization capabilities of the Krypton Toolkit.
*/
private bool _showOnIconClick; | ||
private ThemedSystemMenuItemCollection? _customMenuItems; | ||
private SystemMenuItemCollection? _customMenuItems; | ||
#endregion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Refresh the themed system menu to reflect the new state | ||
_themedSystemMenuService?.ThemedSystemMenu?.Refresh(); | ||
// Refresh the system menu to reflect the new state | ||
_systemMenuService?.SystemMenu?.Refresh(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_systemMenuService?.SystemMenu?.Refresh();
SystemMenu
is a non nullable property so the null check is redundant.
There multiple occurences in KForm of this,
private Rectangle _lastGripClientRect = Rectangle.Empty; | ||
private Rectangle _lastGripWindowRect = Rectangle.Empty; | ||
private readonly KryptonSystemMenuService? _systemMenuService; | ||
private SystemMenuValues _systemMenuValues; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>If detection fails or is ambiguous, returns False (assumes runtime) to ensure | ||
/// application functionality is preserved over designer convenience.</para> | ||
/// </remarks> | ||
private bool IsInDesignMode() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of your feedback has now come up... GH WT****? Screen.Recording.2025-09-30.075549.mp4 |
PR meltdown..... |
@PWagner1 / @giduac just for clarity - The issue of internal panel not allowing the drop of controls is this now resolved? as i have update nightly to the latest yet i still cannot drag controls onto the form. Only way i can is by dropping them into the titlebar dragging back onto the form and then rightclicking. however it still will not show the control at run time. Maybe i missed something i am not sure. any helpc |
Hi @tomdobing Would you mind testing this branch? https://github.com/Krypton-Suite/Standard-Toolkit/tree/alpha-kform-internalpanel-designer-fix cc. @giduac |
Hi @tomdobing I can confirm that it is fixed, but .NET is the culprit for the designer bug. Please follow this workaround. |
KryptonForm
's 'InternalPanel' designer issues #2480